home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
msqc25t1
/
quickpop.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-28
|
919b
|
39 lines
/* quickpop.c: Creates and erases two pop-up windows on successive keystrokes */
#include <graph.h>
#include <conio.h>
#include "textscrn.h"
#include "popup.h"
char string1 [] = "This\nis\na\npopup", /* literals */
string2 [] = "So\nis\nthis";
POPUP pop [] = { /* popup definitions */
{5, 20, 8, 24, 2, BLUE, MAGENTA, CYAN, CYAN, string1},
{8, 23, 10, 26, 1, YELLOW, WHITE, BROWN, BROWN, string2}
};
main()
{
int n;
_savescrn(0); /* save entry screen */
_clearscreen (_GCLEARSCREEN);
for (n = 0; n < 1920; n++) /* fill screen */
_outch (197);
for (n = 0; n < 2; n++) { /* show the popups */
getch ();
_savescrn (0);
popShow (&(pop [n]));
}
for (n = 1; n >=0; n--) { /* then erase them */
getch ();
_restscrn (0);
}
getch();
_restscrn (0); /* restore entry screen */
}